package com.joe.springboot.dmo;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;
import java.math.BigDecimal;

public class User implements Serializable {

    /**
     * id
     */
    @NotBlank(message = "id 不能为空")
    @Length(min = 5, max = 10, message = "{value} is not between {min} and {max}")
    private String id;

    /**
     * 姓名
     */
    private String name;

    private BigDecimal score;

    public User() {
    }

    /**
     * 获取 姓名
     */
    public String getName() {
        return this.name;
    }

    /**
     * 设置 姓名
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取 id
     */
    public String getId() {
        return this.id;
    }

    /**
     * 设置 id
     */
    public void setId(String id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                '}';
    }

    public BigDecimal getScore() {
        return this.score;
    }

    public void setScore(BigDecimal score) {
        this.score = score;
    }
}
